﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;
using Common;

namespace HMIBLL
{
    public class ProjectManager
    {
        public static bool getPics(string projectName, ref TreeNode picsNode)
        {
            picsNode.Nodes.Clear();
            DirectoryInfo dir = new DirectoryInfo(FunctionClass.
                creatDir("/Projects/" + projectName + "/pics"));
            FileInfo[] ks = dir.GetFiles();
            foreach (FileInfo fileInfo in ks)
            {
                TreeNode node = new TreeNode();
                node.Text = fileInfo.Name;
                node.ImageIndex = 37;
                node.SelectedImageIndex = 37;
                node.Tag = fileInfo.FullName;
                picsNode.Nodes.Add(node);
            }
            return true;
        }
    }
}
